<%= simple_form_for(@availability) do |f| %>
  <% if @availability.errors.count > 0 %>
    <ul class="alert alert-danger">
      <% @availability.errors.full_messages.each do |msg| %>
        <li style="margin: 0 15px"><%= msg %></li>
      <% end %>
    </ul>
  <% end %>

  <div class="form-inputs">
    <%= f.association :person, collection: @people_collection %>
    <%= f.input :status, :as => :select, :collection => Availability::STATUS_CHOICES %>
    <%= f.input :description %>

    <%= f.input :start_time, as: :string,
                input_html: { class: 'datetimepicker', size: 11,
                              value: format_datetime_value(f.object.start_time) } %>
    <%= f.input :end_time, as: :string,
                input_html: { class: 'datetimepicker', size: 11,
                              value: format_datetime_value(f.object.end_time) } %>
  </div>

  <div class="form-actions">
    <%= f.button :submit %>
  </div>
<% end %>
